import commonJS from '../../utils/common.js'

const state = {
	userInfo: commonJS.getStrongUser(),
	longitude:'',
	latitude:'',
}

const mutations = {
	// 存储个人信息
	SET_USERINFO(state,user){
		state.userInfo = user;
		commonJS.setStrongUser(user);
	},
	// 清除个人信息
	DEL_USERINFO(state){
		state.userInfo = {};
	},
	SET_LONGITUDE(state,long){
		state.longitude = long;
	},
	SET_LATITUDE(state,lat){
		state.latitude = lat;
	},
	DEL_LOCATION(){
		state.longitude = '';
		state.latitude = '';
	}
}

const actions = {
	
}

export default {
	namespaced:true,
	state,
	mutations,
	actions,
}